package com.sky.define;

public class MethodDemo2 {
    public static void main(String[] args){
        PrintHelloWorld(3);

        System.out.println("----------------------");

        PrintHelloWorld(6);
    }

    //定义无参数无返回值的方法
    public static void PrintHelloWorld(int n){
        for (int i = 0; i < n; i++) {
            System.out.println("Hello World");
        }
    }

}
